12. Solution: Booleans, Comparison and Logical Operators

Here is our solution for the first quiz question on the previous page:

Solution: Which is denser, Rio or San Francisco?

print(san_francisco_pop_density > rio_de_janeiro_pop_density)

Note other solutions are possible, like the one below, but take a moment to make sure you understand and appreciate the concise efficiency of the one line above!

if (san_francisco_pop_density > rio_de_janeiro_pop_density):
    print (True)
else:
    print (False)